<template>
  <div>
    <Head />
    <div class="swip">
      <ShopSwiper1 />
    </div>
    <NavHead>
      <template v-slot:title>
        <SearchInput :textDesc="textDesc" />
      </template>
      <template v-slot:iconfont-right>
        <i class="iconfont icon-gouwuche font" @click="jumpCar"></i>
      </template>
    </NavHead>
    <div class="btn">
      <span class="btn1">
        <button type="info" color="#FF4500" class="one" @click="jumpNewProduct">新品上市</button>
      </span>
      <span class="btn2">
        <button type="info" color="#FF4500" class="two" @click="jumpSecondHand">二手商城</button>
      </span>
    </div>
    <List />
  </div>
</template>


<script>
import api from "../../api";
import NavHead from "../../components/NavHead";
import SearchInput from "../../components/searchInput/SearchInput";
import ShopSwiper1 from "./shopSwiper/ShopSwiper1";
import List from "../../components/list/List";
export default {
  data(){
    return{
    }
  },
  components: {
    NavHead,
    SearchInput,
    ShopSwiper1,
    List,
  },
  data() {
    return {
      bannerList: [],
      textDesc: "请输入搜索的内容",
    };
  },
  methods:{
    jumpNewProduct(){
        this.$router.push({name:'NewProduct'})
    },
    jumpSecondHand(){
        this.$router.push({name:'SecondHand'})
    },
    jumpCar(){
      this.$router.push({name:"ShopCar"})
    }
  },
  mounted() {
    api.gotoHomeBanner().then((res) => {
      // console.log(res.data.list);
      this.bannerList = res.data.list;
    });
  },
};
</script>

<style scoped>
.font {
  color: #fff;
  font-size: 25px;
}
.swip {
  margin-top: 1rem;
}
.btn {
  margin-top: 0.4rem;
}
.btn .btn1 {
  margin-right: 0.3rem;
}
.btn .btn2 {
  margin-left: 0.3rem;
}
.btn .one {
  height: 0.8rem;
  border-radius: 0.6rem;
  width: 35%;
  background-color: #FF6347;
  width: 30%;
  background-color: #ff6347;
  font-size: 0.36rem;
  color: aliceblue;
}
.btn .two {
  height: 0.8rem;
  border-radius: 0.6rem;
  width: 35%;
  background-color: #FF6347;
  font-size: 0.36rem;
  color: aliceblue;
  font-style:normal;

  width: 30%;
  background-color: #ff6347;
  font-size: 0.36rem;
  color: aliceblue;
}
</style>